﻿using System;

namespace Yks.Notify.Client.ApiModels
{
    public class TfsPullRequestCreatedMessage
    {
        public string subscriptionId { get; set; }
        public int notificationId { get; set; }
        public string id { get; set; }
        public string eventType { get; set; }
        public string publisherId { get; set; }
        public string scope { get; set; }
        public Message message { get; set; }
        public Detailedmessage detailedMessage { get; set; }
        public Resource resource { get; set; }
        public string resourceVersion { get; set; }
        public Resourcecontainers resourceContainers { get; set; }
        public DateTime createdDate { get; set; }

        public class Message
        {
            public string text { get; set; }
            public string html { get; set; }
            public string markdown { get; set; }
        }

        public class Detailedmessage
        {
            public string text { get; set; }
            public string html { get; set; }
            public string markdown { get; set; }
        }

        public class Resource
        {
            public Repository repository { get; set; }
            public int pullRequestId { get; set; }
            public string status { get; set; }
            public Createdby createdBy { get; set; }
            public DateTime creationDate { get; set; }
            public string title { get; set; }
            public string description { get; set; }
            public string sourceRefName { get; set; }
            public string targetRefName { get; set; }
            public string mergeStatus { get; set; }
            public string mergeId { get; set; }
            public Lastmergesourcecommit lastMergeSourceCommit { get; set; }
            public Lastmergetargetcommit lastMergeTargetCommit { get; set; }
            public Lastmergecommit lastMergeCommit { get; set; }
            public Reviewer[] reviewers { get; set; }
            public Commit[] commits { get; set; }
            public string url { get; set; }
        }

        public class Repository
        {
            public string id { get; set; }
            public string name { get; set; }
            public string url { get; set; }
            public Project project { get; set; }
            public string defaultBranch { get; set; }
            public string remoteUrl { get; set; }
        }

        public class Project
        {
            public string id { get; set; }
            public string name { get; set; }
            public string url { get; set; }
            public string state { get; set; }
        }

        public class Createdby
        {
            public string id { get; set; }
            public string displayName { get; set; }
            public string uniqueName { get; set; }
            public string url { get; set; }
            public string imageUrl { get; set; }
        }

        public class Lastmergesourcecommit
        {
            public string commitId { get; set; }
            public string url { get; set; }
        }

        public class Lastmergetargetcommit
        {
            public string commitId { get; set; }
            public string url { get; set; }
        }

        public class Lastmergecommit
        {
            public string commitId { get; set; }
            public string url { get; set; }
        }

        public class Reviewer
        {
            public object reviewerUrl { get; set; }
            public int vote { get; set; }
            public string id { get; set; }
            public string displayName { get; set; }
            public string uniqueName { get; set; }
            public string url { get; set; }
            public string imageUrl { get; set; }
            public bool isContainer { get; set; }
        }

        public class Commit
        {
            public string commitId { get; set; }
            public string url { get; set; }
        }

        public class Resourcecontainers
        {
            public Collection collection { get; set; }
            public Account account { get; set; }
            public Project1 project { get; set; }
        }

        public class Collection
        {
            public string id { get; set; }
        }

        public class Account
        {
            public string id { get; set; }
        }

        public class Project1
        {
            public string id { get; set; }
        }
    }
}